The present invention relates to a method for automatically selecting an alternative master node from slave nodes when a failure occurs at a master node and a method for specifying a location of a failure such as line disconnection or a node failure and recovering from the failure, in a network system in which the master node and at least one slave node are present, and the master node transmits a specific signal pattern, which is received by every node at regular time intervals within a fixed time period, and a network system in which specifying the location of the failure and recovering from the failure are implemented.
In a conventional network system in which a master node and slave nodes are present, and the master node which arbitrates a data transmission right is required for data transmission, when a failure occurs at the master node, data communication becomes impossible.
Meanwhile, in a method for detecting a location of a failure in the conventional network system, for example, as disclosed in Japanese Published Patent Application No. Syo 56-161742, in a loop-type network, when a no-carrier state continues during more than a fixed time period, each node which has detected the no-carrier state outputs its carrier, and after specified time elapses, a slave node outputs a response including its node address by means of its carrier, whereby the master node recognizes that there exists a failure before the slave node which output this address.
Hereinafter, this method (Japanese Published Patent Application No. Syo 56-161742) will be described with reference to FIG. 12. FIG. 12 shows an example of the loop-type network. In FIG. 12, reference numeral 12a denotes a main station, 12b, 12c, 12d, and 12e denote terminal stations, and 12f denotes a line. In a normal state, the main station 12a sends a carrier to the terminal station 12b. With this carrier, data is transmitted. The terminal stations 12b-12ereceive, reproduce, and relay this carrier. In the normal state, the nodes 12b, 12c, 12d, and 12e and the main station 12a receive and detect the carrier.
As shown in FIG. 12, when a failure occurs on a line between the terminal stations 12b and 12c, the terminal stations 12c, 12d, and 12e, and the main station 12a detect the no-carrier state, although the terminal station 12b does not detect the no-carrier state, because it receives the carrier normally.
Upon detecting the no-carrier state, each station outputs its carrier after Ta time has elapsed. Therefore, the terminal stations 12d, 12e, and the main station 12a can detect the carrier again. The station which has detected the carrier stops sending its carrier. However, since the failure has occurred on the line between the terminal stations 12b and 12c, the terminal 12c continues detecting the no-carrier state.
Hence, the terminal station 12c prepares for outputting a line down response after Tb time period after outputting its carrier. After Tc time period, the terminal station 12c repeats outputting the line down response including its address at time intervals of Td by means of its carrier. The main terminal 12a receives the line down response from the terminal 12c, thereby detecting there is line disconnection between the terminal station 12c and the terminal station 12b. 
In this method, however, when a network is not of a loop type, the location of the failure cannot be specified if occurrence of the failure is detected by detecting the no-carrier state, depending upon construction of the network.
Turning now to FIG. 13, there is shown a network system disclosed in Japanese Published Patent Application No. Hei. 10-113459, in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or plural loop-connected nodes are directly connected to a common transmission line. Using this network system, two cases, that is, a case where a line disconnection failure occurs between nodes 112 and 111, and a case where a node failure occurs at a master node 101, will be discussed below.
When the line disconnection failure has occurred between the nodes 112 and 111, the nodes 111 and 110 respectively detect the no-carrier state and thereby detect that the failure has occurred. If each of the nodes 111 and 110 which have detected the failure, outputs its carrier, the carrier output from the master node 101 and the carrier output from the node 110 collides on the common communication line 15, and thereby the carrier (from the nodes 111 and 110) is not received normally. As a consequence, the location of the failure cannot be detected/specified.
When the node failure has occurred at the master node 101 and thereby the master nodes 101 stops outputting the carrier, nodes other than the master node 101, i.e., the nodes 100, 110, 111, 112, 120, and 121, detect the no-carier state and thereby detect that the failure has occurred. If the nodes 100, 110, 111, 112, 120, and 121 which have detected occurrence of the failure, each outputs its carrier, the nodes 110, 111, and 120 receive this carrier, whereas the nodes 101, 112, and 121 on upper-most streams in respective loops do not receive this carrier normally, because the carriers output from the nodes 100, 110, and 120 on lower-most streams in the respective loops collide on the common transmission line 15. Thereafter, when the nodes (101, 112, 121) which did not receive this carrier, output responses including their node addresses, these responses also collide on the common transmission line 15, and therefore, the responses cannot be received normally, either. As a consequence, the location of the failure cannot be detected/specified.
In some networks, when a failure occurs at a master node, an alternative master node is selected, whereby stop of operation of the whole network can be avoided. In such networks, it is required that the node which has detected occurrence of the failure decide whether or not the alternative master node should be selected depending upon whether or not the failure has occurred at the master node, respectively. Unless this decision is made, when a failure occurs and the alternative master node need not be selected, a node decides that the alternative master node should be selected even though this is unnecessary, and thereby operates as the alternative master node, which adversely affects operation of the network. On the other hand, when a failure occurs and the alternative master node should be selected, if it is decided that the alternative master node need not be selected even though this is necessary, the alternative master node will not be selected.
To make the above decision, it is necessary to specify the location of the failure. In the method disclosed in Japanese Published Patent Application No. Syo. 56-161742, the location of the failure cannot be specified in the network disclosed in the Japanese Published Patent Application No. Hei. 10-113459.
The present invention is directed to solving the above-described problem, and it is an object of the present invention to provide a network system, a method for specifying a location of a failure, and a method for recovering from the failure, in which occurrence of the failure is detected and the location of the failure is specified, and when a failure occurs at a master node, an alternative master node is automatically selected from slave nodes, whereby stop of operation of the whole network system due to the failure of the master node is avoided, using the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or plural loop-connected nodes are directly connected to a common transmission line shown in FIG. 13.
Other objects and advantages of the invention will become apparent from the detailed description that follows. The detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the spirit and scope of the invention will be apparent to those skill in the art from the detailed description.
According to a first aspect of the present invention, in a network system in which plural nodes are connected by means of a transmission line, and a specific signal pattern is transmitted to the transmission line at regular time intervals within a fixed time period, each of the plural nodes includes signal monitoring means for detecting existence/non-existence of a signal transmitted on the transmission line and detection means for detecting receiving of the specific signal pattern, the detection means detecting occurrence of a failure in the network system, and each of nodes which have detected occurrence of the failure, specifies a location of the failure such that a specifying signal is transmitted/received among the nodes, whether or not the specifying signal is received is detected by the signal monitoring means to decide whether or not the failure has occurred at a spot adjacent to itself, and a signal for specifying a decided location of the failure is transmitted/received among the nodes. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, occurrence of the failure can be detected, and the location of the failure can be specified.
According to a second aspect of the present invention, in a network system in which at least one loop comprising plural nodes loop-connected by means of a transmission line and at least one loop comprising either a single node or the plural nodes loop-connected by means of the transmission line are directly connected to a common transmission line having at least one input port and at least one output port in which a signal input through one input port branches and the resulting signals are output from all output ports, a node of the plural nodes included in one of the loops serves as a master node, nodes other than the node serving as the master node serve as slave nodes, nodes present on lower-most streams in respective loops become lower-most stream nodes in the respective loops, and a specific signal pattern is transmitted at regular time intervals within a fixed time period, each node includes signal monitoring means for detecting existence/non-existence of a signal transmitted on the transmission line and outputting a monitor signal, and detection means for detecting receiving of the specific signal pattern and outputting a signal indicating undetection when the specific signal pattern has not been received during more than a fixed time period, and detects occurrence of a failure in the network system according to the signal indicating undetection, each of nodes which have detected occurrence of the failure, notifies an adjacent node of occurrence of the failure by the use of a notification signal, respective nodes in the network system detect occurrence of the failure according to the notification signal, each of the nodes which have detected occurrence of the failure in the respective loops, transmits a specifying signal to an adjacent node, a node which has detected that it does not receive the specifying signal, according to the monitor signal output from the signal monitoring means, decides that the failure has occurred on an upper stream of itself, and transmits information of a location of the failure in the corresponding loop in the form of an identifier packet including information which identifies itself, to the corresponding lower-most stream node, each of plural lower-most stream nodes, decides the location of the failure in the corresponding loop according to the identifier packet and the monitor signal, and transmits information of a decided location of the failure in the corresponding loop in the form of the identification packet such that identifier packets from respective lower-most steam nodes do not collide, and each of the nodes which have detected occurrence of the failure and the nodes which have detected occurrence of the failure according the notification signal, specifies the location of the failure in the network system, according to the monitor signal and the identifier packets. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, occurrence of the failure can be detected, and the location of the failure can be specified.
According to a third aspect of the present invention, in the network system of the second aspect, the master node outputs an inquiry packet to each of the lower-most stream nodes at normal operation, each of the lower-stream nodes outputs a response packet upon receiving the inquiry packet directed to itself, and the master node detects occurrence of the failure by detecting that it does not receive the response packet. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, it is possible to detect node failure at the lower-most stream node, and occurrence of line disconnection failure just below the lower-most stream node.
According to a fourth aspect of the present invention, in the network system of the first or second aspect, the network includes a master node and at least one slave node, each of the master node and slave nodes has a unique node identifier used for identifying itself, and the slave nodes includes at least one candidate node for an alternative master node, the candidate node which can perform communication normally, when deciding that the alternative master node should be selected according to a specified location of the failure in the network system, starts operation as the alternative master node after waiting time according to the unique node identifier elapses, the candidate node which can perform communication normally, when detecting return of the master node during the waiting time, returns to operation of the slave node, and thereby the alternative master node is selected from at least one candidate node group, and priorities are determined according to unique node identifiers and, after time required for transmitting information indicating that a candidate node of a priority K (K: integer) has started operation as the alternative master node is transmitted to all nodes elapses, waiting times of a candidate node having a priority lower than the K ends. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, occurrence of the failure can be detected, and the location of the failure can be specified. Also, when the failure occurs at the master node, the alternative master node is automatically selected from slave nodes, whereby stop of operation of the whole network system due to the failure at the master node can be avoided.
According to a fifth aspect of the present invention, in a method for specifying a location of a failure in a network system in which plural nodes are connected by means of a transmission line, and a specific signal pattern is transmitted to the transmission line at regular time intervals of within a first fixed time period, nodes detect occurrence of the failure in the network system by detecting that they have not received the specific signal pattern during more than a second fixed time period, each of the nodes which have detected occurrence of the failure, transmits/receives a specifying signal among nodes, and decides whether or not the failure has occurred at a spot adjacent to itself by detecting that it does not receive the specifying signal, and respective nodes specify the location of the failure in the network system by transmitting/receiving a signal indicating a decided location of the failure. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, occurrence of the failure can be detected, and the location of the failure can be specified.
According to a sixth aspect of the present invention, in a method for specifying a location of a failure in a network system in which at least one loop comprising plural nodes loop-connected by means of a transmission line and at least one loop comprising either a single node or the plural nodes loop-connected by means of the transmission line are directly connected to a common transmission line having at least one input port and at least one output port, in which a signal input through one input port branches and the resulting signals are output from all output ports, a node included in one of loops serves as a master node, nodes other than the node serving as the master node serve as slave nodes, nodes present on lower-most streams in respective loops become lower-most stream nodes in the respective loops, and a specific signal pattern is transmitted at regular time intervals within a first fixed time period, nodes detect occurrence of the failure in the network system by detecting that they have not received the specific signal pattern during more than a second fixed time period, each of the nodes which have detected occurrence of the failure, outputs a notification signal to notify an adjacent node that the failure has occurred, respective nodes in the network system detect occurrence of the failure according to the notification signal, each of the nodes which have detected occurrence of the failure in the respective loops, outputs a specifying signal to an adjacent node, a node decides that the failure has occurred on an upper stream of itself by detecting that it does not receive the specifying signal, and outputs information of the location of the failure in the corresponding loop in the form of an identifier packet including information for identifying itself, to the corresponding lower-most stream node, and plural lower-most stream nodes, each decides the location of the failure in the corresponding loop, from the identifier packet and the monitor signal, and transmits information of a decided location of the failure in the form of an identifier packet such that identifier packets transmitted from the plural lower-most stream nodes do not collide, and the nodes which have detected occurrence of the failure and the nodes which have detected occurrence of the failure according the notification signal, each specifies the location of the failure in the network system, according to the monitor signal and the identifier packets. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, occurrence of the failure can be detected, and the location of the failure can be specified.
According to a seventh aspect of the present invention, in a network system in which a network includes a master node having a unique node identifier and either one or a plurality of slave nodes each having a unique node identifier, and the slave nodes includes at least one candidate node for an alternative master node, said network system being a master-slave network system, the candidate node which can perform communication normally, when detecting a failure at the master node, starts operation as the alternative master node after waiting time according to the unique node identifier elapses, the candidate node which can perform communication normally, when detecting return of the master node during the waiting time, returns to operation of the slave node, and thereby the alternative master node is selected from at least one candidate node group, and priorities are determined according to unique node identifiers and, after time required for transmitting information indicating that a candidate node of a priority K (K: integer) has started operation as the alternative master node to all nodes elapses, waiting times of a candidate node having a priority lower than the K ends. Therefore, in the network system in which at least one loop comprising plural loop-connected nodes and at least one loop comprising either a single node or the plural loop-connected nodes are directly connected to a common transmission line, when the failure occurs at the master node, the alternative master node can be selected automatically.